import request from '@/utils/request'

// 查询折扣审核列表
export function listDiscount(query) {
  return request({
    url: '/erp/discount/list',
    method: 'get',
    params: query,
  })
}
export function listDiscounts(data) {
  return request({
    url: '/erp/discount/list/extend',
    method: 'post',
    data: data,
  })
}
// 查询折扣审核详细
export function getDiscount(id) {
  return request({
    url: '/erp/discount/' + id,
    method: 'get',
  })
}

// 新增折扣审核
export function addDiscount(data) {
  return request({
    url: '/erp/discount',
    method: 'post',
    data: data,
  })
}

// 修改折扣审核
export function updateDiscount(data) {
  return request({
    url: '/erp/discount',
    method: 'put',
    data: data,
  })
}

// 删除折扣审核
export function delDiscount(id) {
  return request({
    url: '/erp/discount/' + id,
    method: 'delete',
  })
}

// 导出折扣审核
export function exportDiscount(query) {
  return request({
    url: '/erp/discount/export',
    method: 'get',
    params: query,
  })
}
